package com.nmsl.membership.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.membership.mapper.MembershipMapper;
import com.nmsl.membership.domain.Membership;
import com.nmsl.membership.service.IMembershipService;

/**
 * 会员表Service业务层处理
 * 
 * @author liuyan
 * @date 2025-02-14
 */
//会员列表
@Service
public class MembershipServiceImpl implements IMembershipService 
{
    @Autowired
    private MembershipMapper membershipMapper;

    /**
     * 查询会员表
     * 
     * @param membershipId 会员表主键
     * @return 会员表
     */
    @Override
    public Membership selectMembershipByMembershipId(Long membershipId)
    {
        return membershipMapper.selectMembershipByMembershipId(membershipId);
    }

    /**
     * 查询会员表列表
     * 
     * @param membership 会员表
     * @return 会员表
     */
//    @Override
//    public List<Membership> selectMembershipList(Membership membership)
//    {
//        return membershipMapper.selectMembershipList(membership);
//    }
    @Override
    public List<Membership>  selectMembershipList(Membership membership)
    {
        return membershipMapper.selectMembershipList(membership);
    }
    /**
     * 新增会员表
     * 
     * @param membership 会员表
     * @return 结果
     */
    @Override
    public int insertMembership(Membership membership)
    {
        return membershipMapper.insertMembership(membership);
    }

    /**
     * 修改会员表
     * 
     * @param membership 会员表
     * @return 结果
     */
    @Override
    public int updateMembership(Membership membership)
    {
        return membershipMapper.updateMembership(membership);
    }

    /**
     * 批量删除会员表
     * 
     * @param membershipIds 需要删除的会员表主键
     * @return 结果
     */
    @Override
    public int deleteMembershipByMembershipIds(Long[] membershipIds)
    {
        return membershipMapper.deleteMembershipByMembershipIds(membershipIds);
    }

    /**
     * 删除会员表信息
     * 
     * @param membershipId 会员表主键
     * @return 结果
     */
    @Override
    public int deleteMembershipByMembershipId(Long membershipId)
    {
        return membershipMapper.deleteMembershipByMembershipId(membershipId);
    }
}
